<? echo $adminMenu->write(); ?>

<div class="article">
<div id="backup" style="display: none;"></div>
<div id="preview" style="display: none;"></div>

<? echo $form -> create();?>
<fieldset><legend><? __('ARTICLE_NEW_TITLE');?></legend>
<ul>
	<li><? echo $form->input('title', array('label'=>__('TITLE',true),'div' => false,'style'=>'width:95%')); ?>
	</li>
	<li><? echo $form -> label('intro_text',__('INTRO_TEXT',true).' '.$html -> link($html -> image("help.png",array("alt"=>__("TEXY_HELP",true))),"http://texy.info/cs/syntax-podrobne",array("target"=>"new","title"=>__("TEXY_HELP",true)),null,false)); ?>
	<? echo $form->textarea('intro_text', array('style'=>'width:95%; height:150px;','cols'=>'10','rows'=>'10')); ?>
	</li>
	<li><? echo $form -> label('text',__('TEXT',true).' '.$html -> link($html -> image("help.png",array("alt"=>__("TEXY_HELP",true))),"http://texy.info/cs/syntax-podrobne",array("target"=>"new","title"=>__("TEXY_HELP",true)),null,false)); ?>
	<? echo $form->textarea('text', array('style'=>'width:95%;height:300px;','cols' => '10','rows'=>'10')); ?>
	</li>
	<li>
	<div id="tabs">
	<ul>
		<li id="tabHeaderActive"><a href="javascript:void(0)"
			onclick="toggleTab(1,3,1,false)"><span><? __('ADVANCED_SETTINGS'); ?></span></a></li>
		<li id="tabHeader2"><a href="javascript:void(0)"
			onclick="toggleTab(2,3,2,false)"><span><? __('DISPLAY_OF_ARTICLE'); ?></span></a></li>
		<li id="tabHeader3"><a href="javascript:void(0)"
			onclick="toggleTab(3,3,3,false)"><span><? __('TAGS') ?></span></a></li>
	</ul>

	<div id="tabscontent">
	<div id="tabContent1" class="tabContent">
	<ul>
		<li><? echo $form->input('Article.category_id', array('label'=>__('CATEGORY',true),'div' => false)); ?></li>
		<li><? echo $form->input('user_id', array('label'=>__('AUTHOR',true),'selected'=>(empty($_POST) ? $user['id'] : null),'div' => false)); ?></li>
		<li><? echo $form->input('publish_up', array('label'=>__('PUBLISH_UP',true),'div' => false,'type'=>'text')); ?>
		<button type="reset" id="f_trigger_a"><? __('CALENDAR'); ?></button>
		<script type="text/javascript">
			    Calendar.setup({
			        inputField     :    "ArticlePublishUp",      // id of the input field
			        ifFormat       :    "%Y-%m-%d %H:%M",       // format of the input field
			        button         :    "f_trigger_a",   // trigger for the calendar (button ID)
			        showsTime	   :	"true",
			        timeFormat     :	"24",
			    });
				</script></li>
		<li><? echo $form->input('priority', array('label'=>__('PRIORITY',true),'div' => false,'value'=>(empty($_POST) ? 1 : null),'style'=>'width:50px')); ?></li>
	</ul>
	</div>

	<div id="tabContent2" class="tabContent" style="display: none;">
	<ul>
		<li><? echo $form -> label('visible',__('VISIBLE',true)); ?>
		<? echo $form -> input('visible',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

		<li><? echo $form -> label('show_author',__('SHOW_AUTHOR',true)); ?>
		<? echo $form -> input('show_author',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

		<li><? echo $form -> label('show_informations',__('SHOW_INFORMATIONS',true)); ?>
		<? echo $form -> input('show_informations',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>

		<li><? echo $form -> label('show_all',__('ARTICLE_SHOW_ALL',true)); ?>
		<? echo $form -> input('show_all',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? false : null))); ?></li>

		<li><? echo $form -> label('show_on_index',__('SHOW_ON_INDEX',true)); ?>
		<? echo $form -> input('show_on_index',array('label'=>false,'type'=>'checkbox','checked'=>(empty($_POST) ? true : null))); ?></li>
	</ul>
	</div>

	<div id="tabContent3" class="tabContent" style="display: none;">
	<ul>
		<li><? echo $form->input('Tag', array('style'=>'width: 50%','label'=>__('TAGS',true),'div' => false)); ?></li>
	</ul>
	</div>
	</div>
	<!--End of tabscontent--></div>
	<!--End of tabs--></li>
</ul>
</fieldset>
<div class="input_line">
<div><? echo $articleMenu->create(); ?></div>
</div>
</form>
</div>
